<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img {
            width: 200px;
            height: 200px;
        }

        li {
            list-style: none;
            margin-bottom: 30px;
        }
    </style>
</head>
<body>
    <h1>结算</h1>
    <ul>
        
    </ul>

    <script>
        var shangp = JSON.parse(localStorage.getItem('goods'))
        var ul = document.querySelector('ul')
        shangp.forEach(item=> {
            ul.innerHTML += `
            <li>
                <img src="${item.img}"><br>
                <span>${item.name}</span><br>
                <span style='color:red;'>￥${item.price}</span>
            </li>`
        })
    </script>
</body>
</html>